<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件定义与事件对象</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: pink;
        }
    </style>
</head>
<body>
<div>
</div>
<script>
    // 定义事件与事件对象
    const div = document.querySelector("div")
    div.addEventListener("click",function (e){
        console.log(e.target.tagName)
    })

</script>
</body>
</html>